home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / GameKit / Examples / NX_Invaders / AnimTester / HighScoreTable.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  1.5 KB  |  47 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import <objc/Object.h>     // superclass
  5.  
  6. #define MAXSCORES 10    // max # of high scores
  7.  
  8. @interface HighScoreTable:Object
  9. {
  10.     id    highScoreDispMatrix;    // matrix to show top ten scores
  11.     id  highScorePanel;        // window with high score (top 10) matrix    
  12.     id  highCell;        // used internally by high score routines
  13.     id  preferences;        // PreferencesBrain object
  14.     id gameWindow;
  15.     char *scoreFileName;    // ditto
  16.     
  17.     // instance variables to hold preferences and game status:
  18.     int highScores[10];
  19.     char *highNames[10], *defaultPlayerName;
  20. }
  21.  
  22. - init;                // designated initializer
  23.  
  24. - highScorePanel;
  25. - setHighScorePanel:(id)panel;
  26. - highScoreDispMatrix;
  27. - setHighScoreDispMatrix:(id)matrix;
  28. - (int)highScore:(int)num;    // returns high score [num] (0-9) of top ten
  29.                 // zero is highest, nine is lowest
  30. - setDefaultPlayerName:(const char *)name; // set up name to auto-enter
  31. - (const char *)defaultPlayerName; // return auto-entered name
  32.  
  33. - findHighScoreText:sender;    // internal method - see code
  34.  
  35. - showHighScores;        // fills high score matrix and displays panel
  36. - putInHighScores:(int)score;    // put player in high scores if applicable
  37. - zeroHighScores;        // clears high scores
  38. - readHighScores;        // read high scores from a file
  39. - writeHighScores;        // write high scores to a file
  40.     
  41.     // Interface Builder (IB) methods:
  42. - clearHighScores:sender;    // target of Clear High Scores menu item
  43. - displayHighScores:sender;    // target of High Scores.. menu item
  44. - acceptHighScore:sender;    // target of top 10 matrix (user enters name)
  45.  
  46. @end        
  47.